package com.joy.openggl.graphics.proto;

public class PointF {
	public float x;
	public float y;
	
	public PointF()
	{
		
	}
	
	public PointF(float x, float y)
	{
		this.x = x;
		this.y = y;
	}
	
	public PointF(PointF point)
	{
		this(point.x, point.y);
	}
	
	public static PointF zeroPoint()
	{
		return new PointF(0, 0);
	}
	
	public static PointF create(PointF point)
	{
		return new PointF(point.x, point.y);
	}
	
	public static PointF create(Point point)
	{
		return new PointF(point.x, point.y);
	}
	
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		PointF pf = null;
		try {
			pf = (PointF)o;
		} catch(Exception e) {
			
		}
		if(pf != null) {
			return (this.x == pf.x && this.y == pf.y);
		} else {
			return false;
		}
		//return super.equals(o);
	}
}
